package com.itheima;

import com.itheima.springbootredis.SpringbootRedisApplication;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * @Description:
 * @Version: V1.0
 */
@RunWith(SpringRunner.class)
@SpringBootTest(classes = SpringbootRedisApplication.class)
public class Mytest {

    @Autowired
    private RedisTemplate redisTemplate;
    @Test
    public void set(){
        redisTemplate.boundValueOps("name").set("kk");
    }
    @Test
    public void get(){
        Object name = redisTemplate.boundValueOps("name").get();
        System.out.println(name);
    }
}
